Change AI Agent Status
Used to change the operational status of an AI agent (e.g., active, inactive, paused, archived). This controls whether the agent is currently available for use.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/agents/change-status |
Request
Request Example
curl -X POST 'https://api.seliseblocks.com/agents/change-status' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"is_disabled": false,
"is_archived": false,
"project_key": "YOUR_PROJECT_KEY"
}'
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
| Content-Type | application/json | Yes | Data type, must be application/json. |
Request Body
Request Body Schema
{
"agent_id": "string",
"is_disabled": true,
"is_archived": true,
"project_key": "string"
}
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| agent_id | string | Yes | Unique identifier of the agent whose status is being changed. |
| is_disabled | boolean | Yes | Whether the agent should be disabled (inactive) or enabled (active). |
| is_archived | boolean | Yes | Whether the agent should be archived. |
| project_key | string | Yes | The project key for your project. |
note
- Setting
is_disabledtotruewill make the agent inactive and unavailable for use. - Setting
is_archivedtotruewill archive the agent, typically used for agents no longer in active use. - An agent can be both disabled and archived simultaneously.
Response
Success Response (200 OK)
Returns an object containing the status change result.
{
"is_success": true,
"item_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"detail": "Agent status updated successfully",
"error": {}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| is_success | boolean | Indicates whether the status change was successful. |
| item_id | string | Unique identifier for the updated agent. |
| detail | string | Success or failure message with additional context. |
| error | object | Error details if the operation failed (empty if successful). |
Error Response (422 Unprocessable Entity)
Returns validation error details when the request body is invalid.
{
"detail": [
{
"loc": [
"body",
"agent_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., body field). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |